#include <iostream>
#include <vector>

using namespace std;

void main() {
	vector<float> f_vec;
	vector<int>   i_vec;

	float in_cond = 0.0;
	do {
		cin >> in_cond;
		if ( in_cond != 0.0 )
			f_vec.push_back( in_cond );
	} while (  in_cond != 0.0 );
	
	vector<float>::iterator f_iter
		= f_vec.begin();
	while ( f_iter != f_vec.end() ) {
		int step = 2;
		while ( *f_iter > 0 ) {
			*f_iter -= (float) 1/step;
			step++;
		}
		step -= 2;
		
		i_vec.push_back( step );
		f_iter++;
	}

	vector<int>::iterator i_iter
		= i_vec.begin();
	while ( i_iter != i_vec.end() ) {
		cout << *i_iter << " card(s)" << endl;
		i_iter++;
	}
}
